Sometimes it doesn't work
The other day I had an idea about trying to improve MC samples. The Monte Carlo method for evaluating an integral is the average of a set of samples. Each sample can be considered a very crude approximation to the integral - each sample approximates the integrand as a constant. What if we could make each sample a better approximation, say by using a the derivative information at the sample point?
Another consideration is that the intrinsic variance of the integral (int [f(x)-ave(f)]^2) controls the accuracy of the MC approximation. If we could smooth the integrand, and lower the variance, the MC integral would be better. Perhaps expanding the integral in a series around the sample point and integrating would help smooth it?
Then reality struck. I tried it on v(x)*exp(-v(x)/T), with v(x) = 1/x^12. I made the expansion and integrated in an interval from [x-h,x+h], and graphed the result - it was clearly *not* smoother than the original function. It was also clear that the expansion was an approximation, and only correct in the limit of small h.
Upon further reflection, I realized a few things. One is that each MC sample may be a crude approximation to the integral, but it has the important property of being unbiased (ie, all the errors will average to zero). Any improvement in the sample value needs to retain this property.
Secondly, smoothing would be most valuable when the integrand is rapidly changing. And this is just the condition where the Taylor expansion is likely to be the least accurate. I suppose that any local smoothing of the integrand will suffer from this sort of problem.
Sometimes, it doesn't work. Ah, but that's what research is all about.
No comments:
Post a Comment